home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-03-04 | 1.3 KB | 61 lines | [TEXT/ToyS] |
- property kasConsanants : "BCDFGHJKLMNPQRSTVWXYZ"
- property kasVowels : "AEIOUY"
-
- property kasLocation : {-1, -1} -- Start location of 0,0 centers the window initially
-
- global gasInfo
-
-
- on run
- -- Create an info window (use empty title have title bar on left)
- set gasInfo to display info titled ¬
- "Name 3rd" message ¬
- "KEANU" located at kasLocation ¬
- using font ¬
- "Chicago" using size "36"
- -- Default is line 1
- end run
-
-
- on quit
- -- Close our windows
- display info gasInfo with disposal
- continue quit
- end quit
-
-
- on idle
- -- Preserve window location in kasLocation if it is moved
- set newLoc to screen location of ¬
- (display info gasInfo message GenName())
-
- if (newLoc is not kasLocation) then set kasLocation to newLoc
-
- return random number from 1 to 10
- end idle
-
-
- on GenName()
- set a to random number from 1 to 21
- set b to random number from 1 to 6
- set c to random number from 1 to 6
- set d to random number from 1 to 21
- set e to random number from 1 to 6
-
- set a to character a of kasConsanants
- set b to character b of kasVowels
- set c to character c of kasVowels
- set d to character d of kasConsanants
- set e to character e of kasVowels
-
- set choice to random number from 1 to 3
-
- if choice is 1 then ¬
- return a & b & c & d & e
-
- if choice is 2 then ¬
- return a & e & d & b & c
-
- return e & d & c & b & a
- end GenName
-